.class public Lcom/estrongs/android/pop/zeroconf/h;
.super Ljava/lang/Object;
.source "ZeroconfManager.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/pop/zeroconf/h$a;
    }
.end annotation


# static fields
.field public static p:Ljava/lang/String; = "_esfileshare._tcp.local."

.field public static q:Ljava/lang/String; = "_esdevice._tcp.local."

.field public static r:Ljava/lang/String; = "_smb._tcp.local."

.field public static s:Ljava/lang/String; = "_webdav._tcp.local."

.field public static t:Ljava/lang/String; = "_ftp._tcp.local."

.field private static u:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/net/Inet4Address;",
            ">;"
        }
    .end annotation
.end field

.field private static v:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Ljava/lang/String;",
            "Ljava/net/Inet6Address;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private a:Z

.field private b:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lcom/estrongs/android/pop/zeroconf/f;",
            ">;"
        }
    .end annotation
.end field

.field private c:Ljava/lang/String;

.field private d:Ljava/lang/String;

.field private e:I

.field private volatile f:Ljava/net/InetAddress;

.field private volatile g:Ljava/net/MulticastSocket;

.field private h:Lcom/estrongs/android/pop/zeroconf/h$a;

.field private i:Lcom/estrongs/android/pop/zeroconf/g;

.field private j:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field protected k:Ljava/lang/String;

.field private l:Landroid/net/wifi/WifiManager$MulticastLock;

.field protected m:Ljava/net/InetAddress;

.field protected n:Lcom/estrongs/android/pop/zeroconf/f;

.field private o:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .line 1
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/zeroconf/h;->u:Ljava/util/HashMap;

    .line 2
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    sput-object v0, Lcom/estrongs/android/pop/zeroconf/h;->v:Ljava/util/HashMap;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Lcom/estrongs/android/pop/zeroconf/h;-><init>(Landroid/content/Context;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;I)V
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    .line 4
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    iput-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    const-string v1, "224.0.0.251"

    .line 5
    iput-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->c:Ljava/lang/String;

    const-string v2, "FF02::FB"

    .line 6
    iput-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->d:Ljava/lang/String;

    const/16 v3, 0x14e9

    .line 7
    iput v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    const/4 v4, 0x0

    .line 8
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->h:Lcom/estrongs/android/pop/zeroconf/h$a;

    .line 9
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->i:Lcom/estrongs/android/pop/zeroconf/g;

    .line 10
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->j:Ljava/util/ArrayList;

    .line 11
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    .line 12
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    .line 13
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->m:Ljava/net/InetAddress;

    .line 14
    iput-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    .line 15
    iput v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->o:I

    .line 16
    invoke-static {}, Lcom/estrongs/android/util/f0;->b()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_3

    const-string v4, "wifi"

    .line 17
    invoke-virtual {p1, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/net/wifi/WifiManager;

    const-string v4, "mylockthereturn"

    .line 18
    invoke-virtual {p1, v4}, Landroid/net/wifi/WifiManager;->createMulticastLock(Ljava/lang/String;)Landroid/net/wifi/WifiManager$MulticastLock;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    const/4 v4, 0x1

    .line 19
    invoke-virtual {p1, v4}, Landroid/net/wifi/WifiManager$MulticastLock;->setReferenceCounted(Z)V

    .line 20
    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    invoke-virtual {p1}, Landroid/net/wifi/WifiManager$MulticastLock;->acquire()V

    if-nez p2, :cond_0

    .line 21
    iput-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->c:Ljava/lang/String;

    .line 22
    iput-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->d:Ljava/lang/String;

    .line 23
    iput v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    goto :goto_0

    :cond_0
    if-ne p2, v4, :cond_1

    const-string p1, "239.2.0.251"

    .line 24
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->c:Ljava/lang/String;

    const-string p1, "FF02::FC"

    .line 25
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->d:Ljava/lang/String;

    .line 26
    iput v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    goto :goto_0

    :cond_1
    const/4 p1, 0x2

    if-ne p2, p1, :cond_2

    const-string p1, "239.2.0.252"

    .line 27
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->c:Ljava/lang/String;

    const-string p1, "FF02::FD"

    .line 28
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->d:Ljava/lang/String;

    .line 29
    iput v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    .line 30
    :cond_2
    :goto_0
    invoke-static {v0}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;

    move-result-object p1

    .line 31
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->m:Ljava/net/InetAddress;

    .line 32
    :try_start_0
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v1, "-"

    invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    iput-object p2, p0, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    const/16 v0, 0x2e

    const/16 v1, 0x2d

    .line 33
    invoke-virtual {p2, v0, v1}, Ljava/lang/String;->replace(CC)Ljava/lang/String;

    move-result-object p2

    iput-object p2, p0, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    .line 34
    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, ".local."

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

    iput-object p2, p0, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    .line 35
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Ljava/net/InetAddress;)V

    .line 36
    new-instance p1, Lcom/estrongs/android/pop/zeroconf/h$a;

    invoke-direct {p1, p0}, Lcom/estrongs/android/pop/zeroconf/h$a;-><init>(Lcom/estrongs/android/pop/zeroconf/h;)V

    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->h:Lcom/estrongs/android/pop/zeroconf/h$a;

    .line 37
    invoke-virtual {p1}, Ljava/lang/Thread;->start()V
    :try_end_0
    .catch Ljava/net/UnknownHostException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception p1

    .line 38
    invoke-virtual {p1}, Ljava/net/UnknownHostException;->printStackTrace()V

    :goto_1
    return-void

    .line 39
    :cond_3
    new-instance p1, Ljava/io/IOException;

    const-string p2, "network error"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method private a(Lcom/estrongs/android/pop/zeroconf/f;)Lcom/estrongs/android/pop/zeroconf/f;
    .locals 3

    .line 134
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/estrongs/android/pop/zeroconf/f;

    .line 135
    invoke-virtual {v1, p1}, Lcom/estrongs/android/pop/zeroconf/f;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    return-object v1

    :cond_1
    const/4 p1, 0x0

    return-object p1
.end method

.method private a(Ljava/lang/String;)Lcom/estrongs/android/pop/zeroconf/f;
    .locals 4

    .line 38
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    monitor-enter v0

    .line 39
    :try_start_0
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/estrongs/android/pop/zeroconf/f;

    .line 40
    iget-object v3, v2, Lcom/estrongs/android/pop/zeroconf/f;->k:Ljava/lang/String;

    invoke-virtual {v3, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    .line 41
    monitor-exit v0

    return-object v2

    .line 42
    :cond_1
    monitor-exit v0

    const/4 p1, 0x0

    return-object p1

    :catchall_0
    move-exception p1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_1

    :goto_0
    throw p1

    :goto_1
    goto :goto_0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/zeroconf/h;)Lcom/estrongs/android/pop/zeroconf/h$a;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/zeroconf/h;->h:Lcom/estrongs/android/pop/zeroconf/h$a;

    return-object p0
.end method

.method private a(Lcom/estrongs/android/pop/zeroconf/b;)V
    .locals 4

    .line 116
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0}, Ljava/util/HashSet;-><init>()V

    .line 117
    new-instance v1, Ljava/util/HashSet;

    invoke-direct {v1}, Ljava/util/HashSet;-><init>()V

    .line 118
    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    if-eqz v2, :cond_4

    .line 119
    :try_start_0
    invoke-virtual {p1}, Lcom/estrongs/android/pop/zeroconf/b;->k()Ljava/util/Collection;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/estrongs/android/pop/zeroconf/d;

    .line 120
    invoke-interface {v0, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 121
    invoke-virtual {v2, p0, v1}, Lcom/estrongs/android/pop/zeroconf/d;->a(Lcom/estrongs/android/pop/zeroconf/h;Ljava/util/Set;)V

    goto :goto_0

    .line 122
    :cond_0
    invoke-interface {v1}, Ljava/util/Set;->isEmpty()Z

    move-result p1

    if-nez p1, :cond_4

    .line 123
    new-instance p1, Lcom/estrongs/android/pop/zeroconf/c;

    const v0, 0x8400

    const/4 v2, 0x1

    const/16 v3, 0x5b4

    invoke-direct {p1, v0, v2, v3}, Lcom/estrongs/android/pop/zeroconf/c;-><init>(IZI)V

    const/16 v0, 0xde

    .line 124
    invoke-virtual {p1, v0}, Lcom/estrongs/android/pop/zeroconf/b;->b(I)V

    .line 125
    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_1
    :goto_1
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e;

    if-eqz v1, :cond_1

    const/4 v2, 0x0

    .line 126
    invoke-virtual {p1, v2, v1}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/a;Lcom/estrongs/android/pop/zeroconf/e;)V

    goto :goto_1

    .line 127
    :cond_2
    iget-boolean v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz v0, :cond_3

    sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v1, "#########handleQuery send answer"

    invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 128
    :cond_3
    invoke-virtual {p1}, Lcom/estrongs/android/pop/zeroconf/b;->l()Z

    move-result v0

    if-nez v0, :cond_4

    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/c;)V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :catchall_0
    move-exception p1

    .line 129
    invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V

    :cond_4
    :goto_2
    return-void
.end method

.method private a(Lcom/estrongs/android/pop/zeroconf/f;Lcom/estrongs/android/pop/zeroconf/e$a;)V
    .locals 1

    if-nez p1, :cond_0

    return-void

    .line 130
    :cond_0
    instance-of v0, p2, Lcom/estrongs/android/pop/zeroconf/e$b;

    if-eqz v0, :cond_1

    .line 131
    invoke-virtual {p2}, Lcom/estrongs/android/pop/zeroconf/e$a;->g()Ljava/net/InetAddress;

    move-result-object p2

    check-cast p2, Ljava/net/Inet4Address;

    invoke-virtual {p1, p2}, Lcom/estrongs/android/pop/zeroconf/f;->a(Ljava/net/Inet4Address;)V

    goto :goto_0

    .line 132
    :cond_1
    instance-of v0, p2, Lcom/estrongs/android/pop/zeroconf/e$c;

    if-eqz v0, :cond_2

    .line 133
    invoke-virtual {p2}, Lcom/estrongs/android/pop/zeroconf/e$a;->g()Ljava/net/InetAddress;

    move-result-object p2

    check-cast p2, Ljava/net/Inet6Address;

    invoke-virtual {p1, p2}, Lcom/estrongs/android/pop/zeroconf/f;->a(Ljava/net/Inet6Address;)V

    :cond_2
    :goto_0
    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/pop/zeroconf/h;Lcom/estrongs/android/pop/zeroconf/b;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/zeroconf/h;->c(Lcom/estrongs/android/pop/zeroconf/b;)V

    return-void
.end method

.method private a(Ljava/net/InetAddress;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 136
    invoke-static {p1}, Ljava/net/NetworkInterface;->getByInetAddress(Ljava/net/InetAddress;)Ljava/net/NetworkInterface;

    move-result-object v0

    .line 137
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    if-nez v1, :cond_1

    .line 138
    instance-of v1, p1, Ljava/net/Inet6Address;

    if-eqz v1, :cond_0

    .line 139
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->d:Ljava/lang/String;

    invoke-static {v1}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    goto :goto_0

    .line 140
    :cond_0
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->c:Ljava/lang/String;

    invoke-static {v1}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;

    move-result-object v1

    iput-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    .line 141
    :cond_1
    :goto_0
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    if-eqz v1, :cond_2

    .line 142
    invoke-direct {p0}, Lcom/estrongs/android/pop/zeroconf/h;->c()V

    .line 143
    :cond_2
    new-instance v1, Ljava/net/MulticastSocket;

    iget v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    invoke-direct {v1, v2}, Ljava/net/MulticastSocket;-><init>(I)V

    iput-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    if-eqz p1, :cond_3

    if-eqz v0, :cond_3

    .line 144
    :try_start_0
    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    invoke-virtual {p1, v0}, Ljava/net/MulticastSocket;->setNetworkInterface(Ljava/net/NetworkInterface;)V
    :try_end_0
    .catch Ljava/net/SocketException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception p1

    .line 145
    invoke-virtual {p1}, Ljava/net/SocketException;->printStackTrace()V

    .line 146
    :cond_3
    :goto_1
    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    const/16 v1, 0xff

    invoke-virtual {p1, v1}, Ljava/net/MulticastSocket;->setTimeToLive(I)V

    .line 147
    :try_start_1
    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    new-instance v1, Ljava/net/InetSocketAddress;

    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    iget v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    invoke-direct {v1, v2, v3}, Ljava/net/InetSocketAddress;-><init>(Ljava/net/InetAddress;I)V

    invoke-virtual {p1, v1, v0}, Ljava/net/MulticastSocket;->joinGroup(Ljava/net/SocketAddress;Ljava/net/NetworkInterface;)V
    :try_end_1
    .catch Ljava/net/SocketException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_2

    :catch_1
    move-exception p1

    .line 148
    invoke-virtual {p1}, Ljava/net/SocketException;->printStackTrace()V

    :goto_2
    return-void
.end method

.method private a(Ljava/util/List;)V
    .locals 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/estrongs/android/pop/zeroconf/e;",
            ">;)V"
        }
    .end annotation

    .line 43
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 44
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :cond_0
    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_11

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e;

    .line 45
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Lcom/estrongs/android/pop/zeroconf/e;->b(J)Z

    move-result v2

    if-eqz v2, :cond_1

    .line 46
    instance-of v2, v1, Lcom/estrongs/android/pop/zeroconf/e$d;

    if-eqz v2, :cond_0

    .line 47
    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e$d;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/e$d;->g()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Ljava/lang/String;)Lcom/estrongs/android/pop/zeroconf/f;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 48
    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    monitor-enter v2

    .line 49
    :try_start_0
    iget-object v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    invoke-virtual {v3, v1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 50
    monitor-exit v2
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 51
    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->i:Lcom/estrongs/android/pop/zeroconf/g;

    if-eqz v2, :cond_0

    .line 52
    invoke-interface {v2, v1}, Lcom/estrongs/android/pop/zeroconf/g;->a(Lcom/estrongs/android/pop/zeroconf/f;)V

    goto :goto_0

    :catchall_0
    move-exception p1

    .line 53
    :try_start_1
    monitor-exit v2
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    throw p1

    .line 54
    :cond_1
    instance-of v2, v1, Lcom/estrongs/android/pop/zeroconf/e$e;

    if-eqz v2, :cond_a

    .line 55
    iget-boolean v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz v2, :cond_2

    .line 56
    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "######## get serivce "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-object v4, v1

    check-cast v4, Lcom/estrongs/android/pop/zeroconf/e$e;

    invoke-virtual {v4}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 57
    :cond_2
    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->j:Ljava/util/ArrayList;

    if-nez v2, :cond_3

    goto :goto_0

    .line 58
    :cond_3
    new-instance v2, Lcom/estrongs/android/pop/zeroconf/f;

    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e$e;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/e$e;->g()I

    move-result v4

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/e$e;->h()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v2, v3, v4, v1}, Lcom/estrongs/android/pop/zeroconf/f;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 59
    invoke-direct {p0, v2}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/f;)Lcom/estrongs/android/pop/zeroconf/f;

    move-result-object v1

    if-nez v1, :cond_4

    .line 60
    iget-object v3, v2, Lcom/estrongs/android/pop/zeroconf/f;->c:Ljava/lang/String;

    if-eqz v3, :cond_4

    iget-object v4, p0, Lcom/estrongs/android/pop/zeroconf/h;->j:Ljava/util/ArrayList;

    invoke-virtual {v4, v3}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_4

    .line 61
    iget-object v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    monitor-enter v3

    .line 62
    :try_start_2
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 63
    monitor-exit v3

    goto :goto_1

    :catchall_1
    move-exception p1

    monitor-exit v3
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    throw p1

    :cond_4
    move-object v2, v1

    :goto_1
    if-eqz v2, :cond_0

    .line 64
    invoke-virtual {v2}, Lcom/estrongs/android/pop/zeroconf/f;->c()Z

    move-result v1

    if-nez v1, :cond_0

    .line 65
    sget-object v1, Lcom/estrongs/android/pop/zeroconf/h;->u:Ljava/util/HashMap;

    iget-object v3, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 66
    sget-object v1, Lcom/estrongs/android/pop/zeroconf/h;->u:Ljava/util/HashMap;

    iget-object v3, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/net/Inet4Address;

    invoke-virtual {v2, v1}, Lcom/estrongs/android/pop/zeroconf/f;->a(Ljava/net/Inet4Address;)V

    .line 67
    iget-boolean v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz v1, :cond_5

    sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v3, "#########domain4Map add service"

    invoke-virtual {v1, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 68
    :cond_5
    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 69
    :cond_6
    sget-object v1, Lcom/estrongs/android/pop/zeroconf/h;->v:Ljava/util/HashMap;

    iget-object v3, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_8

    .line 70
    sget-object v1, Lcom/estrongs/android/pop/zeroconf/h;->v:Ljava/util/HashMap;

    iget-object v3, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    invoke-virtual {v1, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/net/Inet6Address;

    invoke-virtual {v2, v1}, Lcom/estrongs/android/pop/zeroconf/f;->a(Ljava/net/Inet6Address;)V

    .line 71
    iget-boolean v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz v1, :cond_7

    sget-object v1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v3, "#########domain6Map add service"

    invoke-virtual {v1, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 72
    :cond_7
    invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto/16 :goto_0

    .line 73
    :cond_8
    :try_start_3
    new-instance v1, Lcom/estrongs/android/pop/zeroconf/c;

    const/4 v3, 0x0

    invoke-direct {v1, v3}, Lcom/estrongs/android/pop/zeroconf/c;-><init>(I)V

    .line 74
    iget-object v4, v2, Lcom/estrongs/android/pop/zeroconf/f;->k:Ljava/lang/String;

    sget-object v5, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;->TYPE_SRV:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;

    sget-object v6, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    invoke-static {v4, v5, v6, v3}, Lcom/estrongs/android/pop/zeroconf/d;->a(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;Z)Lcom/estrongs/android/pop/zeroconf/d;

    move-result-object v4

    invoke-virtual {v1, v4}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/d;)V

    .line 75
    iget-object v4, v2, Lcom/estrongs/android/pop/zeroconf/f;->k:Ljava/lang/String;

    sget-object v5, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;->TYPE_TXT:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;

    sget-object v6, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    invoke-static {v4, v5, v6, v3}, Lcom/estrongs/android/pop/zeroconf/d;->a(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;Z)Lcom/estrongs/android/pop/zeroconf/d;

    move-result-object v4

    invoke-virtual {v1, v4}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/d;)V

    .line 76
    iget-object v4, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v4

    if-lez v4, :cond_9

    .line 77
    iget-object v4, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    sget-object v5, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;->TYPE_A:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;

    sget-object v6, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    invoke-static {v4, v5, v6, v3}, Lcom/estrongs/android/pop/zeroconf/d;->a(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;Z)Lcom/estrongs/android/pop/zeroconf/d;

    move-result-object v4

    invoke-virtual {v1, v4}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/d;)V

    .line 78
    iget-object v2, v2, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    sget-object v4, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;->TYPE_AAAA:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;

    sget-object v5, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    invoke-static {v2, v4, v5, v3}, Lcom/estrongs/android/pop/zeroconf/d;->a(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;Z)Lcom/estrongs/android/pop/zeroconf/d;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/d;)V

    .line 79
    :cond_9
    invoke-virtual {p0, v1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/c;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    goto/16 :goto_0

    :catch_0
    move-exception v1

    .line 80
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto/16 :goto_0

    .line 81
    :cond_a
    instance-of v2, v1, Lcom/estrongs/android/pop/zeroconf/e$b;

    if-eqz v2, :cond_d

    .line 82
    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e$b;

    .line 83
    iget-boolean v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz v2, :cond_b

    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "######## get IPv4 address "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 84
    :cond_b
    sget-object v2, Lcom/estrongs/android/pop/zeroconf/h;->u:Ljava/util/HashMap;

    monitor-enter v2

    .line 85
    :try_start_4
    sget-object v3, Lcom/estrongs/android/pop/zeroconf/h;->u:Ljava/util/HashMap;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/e$a;->g()Ljava/net/InetAddress;

    move-result-object v5

    check-cast v5, Ljava/net/Inet4Address;

    invoke-virtual {v3, v4, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 86
    monitor-exit v2
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_2

    .line 87
    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/estrongs/android/pop/zeroconf/h;->b(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 88
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-lez v3, :cond_0

    .line 89
    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_c
    :goto_2
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/estrongs/android/pop/zeroconf/f;

    .line 90
    invoke-direct {p0, v3, v1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/f;Lcom/estrongs/android/pop/zeroconf/e$a;)V

    .line 91
    invoke-virtual {v3}, Lcom/estrongs/android/pop/zeroconf/f;->c()Z

    move-result v4

    if-eqz v4, :cond_c

    .line 92
    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :catchall_2
    move-exception p1

    .line 93
    :try_start_5
    monitor-exit v2
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_2

    throw p1

    .line 94
    :cond_d
    instance-of v2, v1, Lcom/estrongs/android/pop/zeroconf/e$c;

    if-eqz v2, :cond_10

    .line 95
    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e$c;

    .line 96
    iget-boolean v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz v2, :cond_e

    sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;

    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "######## get IPv6 address "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 97
    :cond_e
    sget-object v2, Lcom/estrongs/android/pop/zeroconf/h;->v:Ljava/util/HashMap;

    monitor-enter v2

    .line 98
    :try_start_6
    sget-object v3, Lcom/estrongs/android/pop/zeroconf/h;->v:Ljava/util/HashMap;

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/e$a;->g()Ljava/net/InetAddress;

    move-result-object v5

    check-cast v5, Ljava/net/Inet6Address;

    invoke-virtual {v3, v4, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 99
    monitor-exit v2
    :try_end_6
    .catchall {:try_start_6 .. :try_end_6} :catchall_3

    .line 100
    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/estrongs/android/pop/zeroconf/h;->b(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 101
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v3

    if-lez v3, :cond_0

    .line 102
    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_f
    :goto_3
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/estrongs/android/pop/zeroconf/f;

    .line 103
    invoke-direct {p0, v3, v1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/f;Lcom/estrongs/android/pop/zeroconf/e$a;)V

    .line 104
    invoke-virtual {v3}, Lcom/estrongs/android/pop/zeroconf/f;->c()Z

    move-result v4

    if-eqz v4, :cond_f

    .line 105
    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_3

    :catchall_3
    move-exception p1

    .line 106
    :try_start_7
    monitor-exit v2
    :try_end_7
    .catchall {:try_start_7 .. :try_end_7} :catchall_3

    throw p1

    .line 107
    :cond_10
    instance-of v2, v1, Lcom/estrongs/android/pop/zeroconf/e$f;

    if-eqz v2, :cond_0

    .line 108
    check-cast v1, Lcom/estrongs/android/pop/zeroconf/e$f;

    .line 109
    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/DNSEntry;->b()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/estrongs/android/pop/zeroconf/h;->a(Ljava/lang/String;)Lcom/estrongs/android/pop/zeroconf/f;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 110
    invoke-virtual {v1}, Lcom/estrongs/android/pop/zeroconf/e$f;->g()[B

    move-result-object v1

    invoke-virtual {v2, v1}, Lcom/estrongs/android/pop/zeroconf/f;->a([B)V

    goto/16 :goto_0

    .line 111
    :cond_11
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result p1

    if-lez p1, :cond_13

    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->i:Lcom/estrongs/android/pop/zeroconf/g;

    if-eqz p1, :cond_13

    .line 112
    iget-boolean p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->a:Z

    if-eqz p1, :cond_12

    sget-object p1, Ljava/lang/System;->out:Ljava/io/PrintStream;

    const-string v1, "#########to add service"

    invoke-virtual {p1, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

    .line 113
    :cond_12
    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_4
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_13

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/pop/zeroconf/f;

    .line 114
    iget v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->o:I

    iput v1, v0, Lcom/estrongs/android/pop/zeroconf/f;->n:I

    .line 115
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->i:Lcom/estrongs/android/pop/zeroconf/g;

    invoke-interface {v1, v0}, Lcom/estrongs/android/pop/zeroconf/g;->b(Lcom/estrongs/android/pop/zeroconf/f;)V

    goto :goto_4

    :cond_13
    return-void
.end method

.method static synthetic b(Lcom/estrongs/android/pop/zeroconf/h;)Ljava/net/MulticastSocket;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    return-object p0
.end method

.method private b(Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList<",
            "Lcom/estrongs/android/pop/zeroconf/f;",
            ">;"
        }
    .end annotation

    .line 14
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 15
    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    monitor-enter v1

    .line 16
    :try_start_0
    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_0
    :goto_0
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/estrongs/android/pop/zeroconf/f;

    .line 17
    iget-object v4, v3, Lcom/estrongs/android/pop/zeroconf/f;->e:Ljava/lang/String;

    invoke-virtual {v4, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_0

    .line 18
    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 19
    :cond_1
    monitor-exit v1

    return-object v0

    :catchall_0
    move-exception p1

    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_2

    :goto_1
    throw p1

    :goto_2
    goto :goto_1
.end method

.method private b(Lcom/estrongs/android/pop/zeroconf/b;)V
    .locals 0

    if-eqz p1, :cond_0

    .line 13
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/b;)V

    :cond_0
    return-void
.end method

.method static synthetic b(Lcom/estrongs/android/pop/zeroconf/h;Lcom/estrongs/android/pop/zeroconf/b;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/zeroconf/h;->b(Lcom/estrongs/android/pop/zeroconf/b;)V

    return-void
.end method

.method private c()V
    .locals 2

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    if-eqz v0, :cond_0

    .line 4
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    iget-object v1, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    invoke-virtual {v0, v1}, Ljava/net/MulticastSocket;->leaveGroup(Ljava/net/InetAddress;)V
    :try_end_0
    .catch Ljava/lang/Error; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    goto :goto_0

    :catchall_0
    move-exception v0

    goto :goto_1

    :catch_0
    move-exception v0

    .line 5
    :try_start_1
    invoke-virtual {v0}, Ljava/lang/Error;->printStackTrace()V

    .line 6
    :goto_0
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    invoke-virtual {v0}, Ljava/net/MulticastSocket;->close()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    goto :goto_2

    .line 7
    :goto_1
    invoke-virtual {v0}, Ljava/lang/Throwable;->printStackTrace()V

    :goto_2
    const/4 v0, 0x0

    .line 8
    iput-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    .line 9
    iput-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    :cond_0
    return-void
.end method

.method private c(Lcom/estrongs/android/pop/zeroconf/b;)V
    .locals 1

    if-eqz p1, :cond_0

    .line 1
    invoke-virtual {p1}, Lcom/estrongs/android/pop/zeroconf/b;->f()I

    move-result v0

    iput v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->o:I

    .line 2
    invoke-virtual {p1}, Lcom/estrongs/android/pop/zeroconf/b;->b()Ljava/util/Collection;

    move-result-object p1

    check-cast p1, Ljava/util/List;

    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Ljava/util/List;)V

    :cond_0
    return-void
.end method


# virtual methods
.method public a(Ljava/util/ArrayList;I)Ljava/util/ArrayList;
    .locals 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList<",
            "Ljava/lang/String;",
            ">;I)",
            "Ljava/util/ArrayList<",
            "Lcom/estrongs/android/pop/zeroconf/f;",
            ">;"
        }
    .end annotation

    if-eqz p1, :cond_2

    .line 28
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v0

    if-nez v0, :cond_0

    goto :goto_2

    .line 29
    :cond_0
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->j:Ljava/util/ArrayList;

    .line 30
    invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 31
    new-instance v1, Lcom/estrongs/android/pop/zeroconf/c;

    const/4 v2, 0x0

    invoke-direct {v1, v2}, Lcom/estrongs/android/pop/zeroconf/c;-><init>(I)V

    .line 32
    :try_start_0
    sget-object v3, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;->TYPE_PTR:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;

    sget-object v4, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    invoke-static {v0, v3, v4, v2}, Lcom/estrongs/android/pop/zeroconf/d;->a(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;Z)Lcom/estrongs/android/pop/zeroconf/d;

    move-result-object v0

    invoke-virtual {v1, v0}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/d;)V

    .line 33
    invoke-virtual {p0, v1}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/c;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 34
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :cond_1
    int-to-long p1, p2

    .line 35
    :try_start_1
    invoke-static {p1, p2}, Ljava/lang/Thread;->sleep(J)V
    :try_end_1
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_1

    :catch_1
    move-exception p1

    .line 36
    invoke-virtual {p1}, Ljava/lang/InterruptedException;->printStackTrace()V

    .line 37
    :goto_1
    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->b:Ljava/util/ArrayList;

    return-object p1

    :cond_2
    :goto_2
    const/4 p1, 0x0

    return-object p1
.end method

.method public a()V
    .locals 2

    const/4 v0, 0x0

    .line 18
    :try_start_0
    iput-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    .line 19
    iput-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->h:Lcom/estrongs/android/pop/zeroconf/h$a;

    .line 20
    iput-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->i:Lcom/estrongs/android/pop/zeroconf/g;

    .line 21
    sget-object v0, Lcom/estrongs/android/pop/zeroconf/h;->u:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    .line 22
    sget-object v0, Lcom/estrongs/android/pop/zeroconf/h;->v:Ljava/util/HashMap;

    invoke-virtual {v0}, Ljava/util/HashMap;->clear()V

    .line 23
    invoke-direct {p0}, Lcom/estrongs/android/pop/zeroconf/h;->c()V

    .line 24
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$MulticastLock;->isHeld()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 25
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/net/wifi/WifiManager$MulticastLock;->setReferenceCounted(Z)V

    .line 26
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->l:Landroid/net/wifi/WifiManager$MulticastLock;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager$MulticastLock;->release()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v0

    .line 27
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    :cond_0
    :goto_0
    return-void
.end method

.method public a(Lcom/estrongs/android/pop/zeroconf/c;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 149
    invoke-virtual {p1}, Lcom/estrongs/android/pop/zeroconf/b;->l()Z

    move-result v0

    if-nez v0, :cond_0

    .line 150
    invoke-virtual {p1}, Lcom/estrongs/android/pop/zeroconf/c;->q()[B

    move-result-object p1

    .line 151
    new-instance v0, Ljava/net/DatagramPacket;

    array-length v1, p1

    iget-object v2, p0, Lcom/estrongs/android/pop/zeroconf/h;->f:Ljava/net/InetAddress;

    iget v3, p0, Lcom/estrongs/android/pop/zeroconf/h;->e:I

    invoke-direct {v0, p1, v1, v2, v3}, Ljava/net/DatagramPacket;-><init>([BILjava/net/InetAddress;I)V

    .line 152
    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    if-eqz p1, :cond_0

    .line 153
    invoke-virtual {p1}, Ljava/net/MulticastSocket;->isClosed()Z

    move-result v1

    if-nez v1, :cond_0

    .line 154
    invoke-virtual {p1, v0}, Ljava/net/MulticastSocket;->send(Ljava/net/DatagramPacket;)V

    :cond_0
    return-void
.end method

.method public a(Lcom/estrongs/android/pop/zeroconf/g;)V
    .locals 0

    .line 3
    iput-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->i:Lcom/estrongs/android/pop/zeroconf/g;

    return-void
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;I)Z
    .locals 17

    move-object/from16 v1, p0

    move-object/from16 v0, p2

    move/from16 v11, p3

    .line 4
    iget-object v2, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    const/4 v12, 0x0

    if-eqz v2, :cond_0

    return v12

    :cond_0
    if-eqz v0, :cond_4

    if-gez v11, :cond_1

    goto/16 :goto_2

    .line 5
    :cond_1
    :try_start_0
    new-instance v13, Lcom/estrongs/android/pop/zeroconf/c;

    invoke-direct {v13, v12}, Lcom/estrongs/android/pop/zeroconf/c;-><init>(I)V

    .line 6
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "."

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-object/from16 v0, p1

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v14

    .line 7
    sget-object v2, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;->TYPE_ANY:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;

    sget-object v3, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    invoke-static {v14, v2, v3, v12}, Lcom/estrongs/android/pop/zeroconf/d;->a(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordType;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;Z)Lcom/estrongs/android/pop/zeroconf/d;

    move-result-object v2

    invoke-virtual {v13, v2}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/d;)V

    .line 8
    new-instance v15, Lcom/estrongs/android/pop/zeroconf/e$e;

    sget-object v4, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    const/4 v5, 0x0

    const/16 v6, 0xe10

    const/4 v7, 0x0

    const/4 v8, 0x0

    iget-object v10, v1, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    move-object v2, v15

    move-object v3, v14

    move/from16 v9, p3

    invoke-direct/range {v2 .. v10}, Lcom/estrongs/android/pop/zeroconf/e$e;-><init>(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;ZIIIILjava/lang/String;)V

    invoke-virtual {v13, v15}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/e;)V

    const/4 v15, 0x1

    const/4 v2, 0x1

    :goto_0
    add-int/lit8 v3, v2, -0x1

    if-lez v2, :cond_2

    .line 9
    invoke-virtual {v1, v13}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/c;)V

    const-wide/16 v4, 0x104

    .line 10
    invoke-static {v4, v5}, Ljava/lang/Thread;->sleep(J)V

    move v2, v3

    goto :goto_0

    .line 11
    :cond_2
    new-instance v13, Lcom/estrongs/android/pop/zeroconf/c;

    const v2, 0x8400

    invoke-direct {v13, v2}, Lcom/estrongs/android/pop/zeroconf/c;-><init>(I)V

    .line 12
    new-instance v2, Lcom/estrongs/android/pop/zeroconf/e$d;

    sget-object v5, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    const/4 v6, 0x0

    const/16 v7, 0xe10

    move-object v3, v2

    move-object/from16 v4, p1

    move-object v8, v14

    invoke-direct/range {v3 .. v8}, Lcom/estrongs/android/pop/zeroconf/e$d;-><init>(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;ZILjava/lang/String;)V

    const/4 v0, 0x0

    invoke-virtual {v13, v0, v2}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/a;Lcom/estrongs/android/pop/zeroconf/e;)V

    .line 13
    new-instance v10, Lcom/estrongs/android/pop/zeroconf/e$e;

    sget-object v4, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    const/4 v5, 0x1

    const/16 v6, 0xe10

    const/4 v7, 0x0

    const/4 v8, 0x0

    iget-object v9, v1, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    move-object v2, v10

    move-object v3, v14

    move-object/from16 v16, v9

    move/from16 v9, p3

    move-object v12, v10

    move-object/from16 v10, v16

    invoke-direct/range {v2 .. v10}, Lcom/estrongs/android/pop/zeroconf/e$e;-><init>(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;ZIIIILjava/lang/String;)V

    invoke-virtual {v13, v0, v12}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/a;Lcom/estrongs/android/pop/zeroconf/e;)V

    const/4 v0, 0x1

    :goto_1
    add-int/lit8 v2, v0, -0x1

    if-lez v0, :cond_3

    .line 14
    invoke-virtual {v1, v13}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/c;)V

    const-wide/16 v3, 0x64

    .line 15
    invoke-static {v3, v4}, Ljava/lang/Thread;->sleep(J)V

    move v0, v2

    goto :goto_1

    .line 16
    :cond_3
    new-instance v0, Lcom/estrongs/android/pop/zeroconf/f;

    iget-object v2, v1, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    invoke-direct {v0, v14, v11, v2}, Lcom/estrongs/android/pop/zeroconf/f;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    iput-object v0, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return v15

    :catch_0
    move-exception v0

    .line 17
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    const/4 v2, 0x0

    return v2

    :cond_4
    :goto_2
    const/4 v2, 0x0

    return v2
.end method

.method a(Ljava/net/DatagramPacket;)Z
    .locals 3

    .line 155
    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    invoke-virtual {v0}, Ljava/net/MulticastSocket;->getInetAddress()Ljava/net/InetAddress;

    move-result-object v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_2

    .line 156
    invoke-virtual {p1}, Ljava/net/DatagramPacket;->getAddress()Ljava/net/InetAddress;

    move-result-object p1

    if-eqz p1, :cond_2

    .line 157
    invoke-virtual {p1}, Ljava/net/InetAddress;->isLinkLocalAddress()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    invoke-virtual {v0}, Ljava/net/MulticastSocket;->getInetAddress()Ljava/net/InetAddress;

    move-result-object v0

    invoke-virtual {v0}, Ljava/net/InetAddress;->isLinkLocalAddress()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v2, 0x1

    .line 158
    :cond_0
    invoke-virtual {p1}, Ljava/net/InetAddress;->isLoopbackAddress()Z

    move-result p1

    if-eqz p1, :cond_1

    iget-object p1, p0, Lcom/estrongs/android/pop/zeroconf/h;->g:Ljava/net/MulticastSocket;

    invoke-virtual {p1}, Ljava/net/MulticastSocket;->getInetAddress()Ljava/net/InetAddress;

    move-result-object p1

    invoke-virtual {p1}, Ljava/net/InetAddress;->isLoopbackAddress()Z

    move-result p1

    if-nez p1, :cond_1

    goto :goto_0

    :cond_1
    move v1, v2

    goto :goto_0

    :cond_2
    const/4 v1, 0x0

    :goto_0
    return v1
.end method

.method public b()Z
    .locals 20

    move-object/from16 v1, p0

    .line 3
    iget-object v0, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    const/4 v2, 0x0

    if-nez v0, :cond_0

    return v2

    :cond_0
    const/4 v3, 0x0

    .line 4
    :try_start_0
    new-instance v0, Lcom/estrongs/android/pop/zeroconf/c;

    const v4, 0x8400

    invoke-direct {v0, v4}, Lcom/estrongs/android/pop/zeroconf/c;-><init>(I)V

    .line 5
    new-instance v4, Lcom/estrongs/android/pop/zeroconf/e$d;

    iget-object v5, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    iget-object v6, v5, Lcom/estrongs/android/pop/zeroconf/f;->c:Ljava/lang/String;

    sget-object v7, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    const/4 v8, 0x0

    const/4 v9, 0x0

    iget-object v5, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    iget-object v10, v5, Lcom/estrongs/android/pop/zeroconf/f;->k:Ljava/lang/String;

    move-object v5, v4

    invoke-direct/range {v5 .. v10}, Lcom/estrongs/android/pop/zeroconf/e$d;-><init>(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;ZILjava/lang/String;)V

    invoke-virtual {v0, v3, v4}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/a;Lcom/estrongs/android/pop/zeroconf/e;)V

    .line 6
    new-instance v4, Lcom/estrongs/android/pop/zeroconf/e$e;

    iget-object v5, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    iget-object v12, v5, Lcom/estrongs/android/pop/zeroconf/f;->k:Ljava/lang/String;

    sget-object v13, Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;->CLASS_IN:Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;

    const/4 v14, 0x1

    const/4 v15, 0x0

    const/16 v16, 0x0

    const/16 v17, 0x0

    iget-object v5, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    iget v5, v5, Lcom/estrongs/android/pop/zeroconf/f;->d:I

    iget-object v6, v1, Lcom/estrongs/android/pop/zeroconf/h;->k:Ljava/lang/String;

    move-object v11, v4

    move/from16 v18, v5

    move-object/from16 v19, v6

    invoke-direct/range {v11 .. v19}, Lcom/estrongs/android/pop/zeroconf/e$e;-><init>(Ljava/lang/String;Lcom/estrongs/android/pop/zeroconf/constants/DNSRecordClass;ZIIIILjava/lang/String;)V

    invoke-virtual {v0, v3, v4}, Lcom/estrongs/android/pop/zeroconf/c;->a(Lcom/estrongs/android/pop/zeroconf/a;Lcom/estrongs/android/pop/zeroconf/e;)V

    const/4 v4, 0x2

    :goto_0
    add-int/lit8 v5, v4, -0x1

    if-lez v4, :cond_1

    .line 7
    invoke-virtual {v1, v0}, Lcom/estrongs/android/pop/zeroconf/h;->a(Lcom/estrongs/android/pop/zeroconf/c;)V

    const-wide/16 v6, 0x64

    .line 8
    invoke-static {v6, v7}, Ljava/lang/Thread;->sleep(J)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    move v4, v5

    goto :goto_0

    .line 9
    :cond_1
    iput-object v3, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    const/4 v0, 0x1

    return v0

    :catchall_0
    move-exception v0

    goto :goto_1

    :catch_0
    move-exception v0

    .line 10
    :try_start_1
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 11
    iput-object v3, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    return v2

    :goto_1
    iput-object v3, v1, Lcom/estrongs/android/pop/zeroconf/h;->n:Lcom/estrongs/android/pop/zeroconf/f;

    .line 12
    goto :goto_3

    :goto_2
    throw v0

    :goto_3
    goto :goto_2
.end method
